import { RouteLocationNormalizedLoaded, RouteParamValue, RouteRecordName } from 'vue-router'
import { leavingMessage } from '@/config'

export function addLeavingMessage(name: RouteRecordName, msg: RouteParamValue | RouteParamValue[]) {
  leavingMessage(name, msg)
}

export function getLeavingMessage(route: RouteLocationNormalizedLoaded): string {
  return route.params.leaveMessage as string
}
